package msi.agentClasses;

import java.util.HashSet;
import java.util.Set;

public class WumpusTile {
	public int row;
	public int col;
	
	public WumpusTile(int r, int c){
		row=r; col=c;
	}
	
	public Set<WumpusTile> getAdjacentTiles(int wSize){
		Set<WumpusTile> tiles = new HashSet<WumpusTile>();
			if(row<wSize){
				tiles.add(new WumpusTile(row+1, col));
			}if(col<wSize){
				tiles.add(new WumpusTile(row,col+1));
			}if(col>1){
				tiles.add(new WumpusTile(row,col-1));
			}if(row>1){
				tiles.add(new WumpusTile(row-1,col));
			}
		return tiles;
	}
	
	@Override
	public String toString(){
		return row+"x"+col;
	}

}
